{extend name="common/base" /}
{block name="title"}商品列表{/block}
{block name="main"}
<script src="/ad/js/g_add/g_list.js"></script>
     <!-- Navigation -->
		<div id="page-wrapper">
        <div class="col-md-12 graphs">
	   <div class="xs">
  	 <h3>商品列表</h3>
  	<div class="bs-example4" data-example-id="contextual-table">
	<h5 ><a href="{:url('Goods/g_add')}"><span class="label label-success">添加商品</span></a></h5>
    <div class="table-responsive">
    <table class="table">
      <thead>
        <tr>
          <th>#</th>
		  <th>商品图片</th>
          <th>商品名称</th>
          <th>商品价格</th>
		  <th>添加时间</th>
          <th>商品状态</th>
          <th>商品推荐</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
		{volist name="data" id="m" key="k"}
        <tr>
          <th scope="row">{$k}</th>
		      <td><img src="{$m['goods_image']}" style="width:40px;"/></td>
          <td>{$m.goods_title}{$m.goods_brand}</td>
		      <td>{$m.goods_price}</td>
          <td>{$m.goods_addtime|date='Y-m-d',###}</td>
          <td><span class="label {$m['goods_isactivity']==0?'label-warning':'label-success'} isActivity" data-id="{$m['goods_id']}" data-status="{$m['goods_isactivity']}">{$m['goods_isactivity']==0?'常规商品':'活动商品'}</span></td>
          <td><span class="label {$m['goods_recom']==0?'label-warning':'label-success'} goods_recom" data-id="{$m['goods_id']}" data-status="{$m['goods_recom']}">{$m['goods_recom']==0?'常规':'推荐'}</span></td>
		  <td>
        <h5><a href="{:url('Goods/g_add',array('goods_id'=>$m['goods_id']))}"><span class="label label-primary">编辑</span></a>&nbsp;
        <a href="{:url('Goods/g_select',array('goods_id'=>$m['goods_id']))}"><span class="label label-success">查看</span></a> &nbsp;
        <a href="javascript:void(0)" data-url="{:url('Goods/g_delete')}" data-id="{$m['goods_id']}" class="del_goods"><span class="label label-danger">删除</span></a></h5>
      </td>
        </tr>
		{/volist}

      </tbody>
    </table>
    </div>
	  <div style="text-align:center;">{$data -> render()}</div>
   </div>
  </div>
  </div>
  {/block}


